export MASTER_ADDR=localhost
export MASTER_PORT=29688
export HCCL_WHITELIST_DISABLE=1

NPUS=($(seq 0 7))
export NPU_WORLD_SIZE=${#NPUS[@]}
# 0917: rank=0
rank=0
for i in ${NPUS[@]}
do
    export NPU_CALCULATE_DEVICE=${i}
    export RANK=${rank}
    echo run process ${rank}
    bash bsn.sh  > output_npu_${i}.log 2>&1 &
    #python3.7 main.py --module TEM --mode train | tee output_npu_${i}.log &  #-tem_batch_size 32
    let rank++
done
